package com.latefly.skewwork.ui.page.login

import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.material3.TextField
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import androidx.navigation.NavHostController

@Composable
fun LoginPage(
    navController: NavHostController,
    modifier: Modifier
) {
    Column(
        modifier = Modifier
            .padding(start = 30.dp, end = 30.dp, top = 100.dp)
            .fillMaxWidth()
            .fillMaxHeight(),
        horizontalAlignment = Alignment.CenterHorizontally
    ) {
        Row {
            Text(
                "Account",
                modifier = Modifier
                    .weight(1f)
                    .align(Alignment.CenterVertically)
            )
            Spacer(modifier = Modifier.size(5.dp))
            TextField(
                value = "admin",
                onValueChange = {},
                modifier = Modifier
                    .weight(3f)
                    .padding(bottom = 5.dp)
            )
        }

        Row {
            Text(
                "Pass",
                modifier = Modifier
                    .weight(1f)
                    .align(Alignment.CenterVertically)
            )
            Spacer(modifier = Modifier.size(5.dp))
            TextField(
                value = "",
                onValueChange = {},
                modifier = Modifier
                    .weight(3f)
                    .padding(bottom = 5.dp)
            )
        }

        Row {
            Button(
                onClick = { navController.navigate("Home") },
                modifier = Modifier.weight(1f)
            ) {
                Text(text = "Login")
            }
            Spacer(modifier = Modifier.size(5.dp))
            Button(
                onClick = {navController.navigate("Login/Register") },
                modifier = Modifier.weight(1f)
            ) {
                Text(text = "Register")
            }
        }
        Text(text = "SkewWork V1.0.0")
        Text(text = "Latefly")

    }

}
